classdef OccupancySVMTrainer < handle
	%
	%
	% ---------------------------------------------------------------------
	properties
		%
		% parameters
		fTrainingVsTestSetDimensionsRatio;
		strSvmlibOptions;
		iThresholdForDiscardingEventsClass;
		%
		% array of objects containing the raw data
		atEvents;
		%
		% since we do an one-against-all classification, 
		aiLabelsVsClassesLUT;
		%
		% summarizes the performance of the estimator
		fEstimationAccuracy;
		%
		% SVM objects (we do a one-against-all multi-classification)
		atSVMs;
		%
	end %
	%
	%
	% ---------------------------------------------------------------------
	methods
		%
		% standard constructor
		function tSVMTrainer = OccupancySVMTrainer( strDatasetFromWebsite, strManualDataset, strResultsFile, bDoInteractiveTraining )
			%
			tSVMTrainer.LoadParameters();
			tSVMTrainer.LoadDatasets( strDatasetFromWebsite, strManualDataset, bDoInteractiveTraining );
			tSVMTrainer.Train();
			tSVMTrainer.SaveResults( strResultsFile );			
			%
			% DEBUG
			fprintf('Training finished. Accuracy: %.5f\n', tSVMTrainer.fEstimationAccuracy);
			%
		end % standard constructor
		%
	end %
	%
	%
	%
	% ---------------------------------------------------------------------
	methods(Static = true)
		%
		%
	end	%
	%
	%
end %
